package org.example.util;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;

import java.nio.file.Paths;

/**
 * @author navy
 * @company 源辰信息
 * @date 2024/9/23
 * @email haijunzhou@hnit.edu.cn
 */
public class CodeGenerator {

    public static void main(String[] args) {
        generate();
    }

    public static void generate(){
        FastAutoGenerator.create("jdbc:mysql:///damai", "root", "a")
                .globalConfig(builder -> builder
                        .author("ly")
                        .outputDir("E:\\视频录播\\144\\yc144\\damai\\code")
                        .commentDate("yyyy-MM-dd")
                )
                .packageConfig(builder -> builder
                        .parent("com.yc.damai")
                        .entity("entity")
                        .mapper("mapper")
                        .service("biz")
                        .serviceImpl("biz.impl")
                        .xml("mapper.xml")
                )
                .strategyConfig(builder -> builder
                        .entityBuilder()
                        .enableLombok()
                )
//                .templateEngine(new FreemarkerTemplateEngine())
                .execute();
    }


}
